<style>
    .panel-header, .panel-body {
        border-width: 0px;
    }

    .datagrid, .combo-p {
        border: solid 1px #D4D4D4;
    }

    .panel-title {
        cursor: pointer
    }

    .inlineblock {
        margin-top: 10px;
    }

    .inlineblock div {
        display: inline-block;
    }

    .inlineblock div label {
        display: inline-block;
        top: 5px;
    }

    .newform {
        width: 70%;
    }

    .editform {
        width: 70%;
    }



    .searchClass label {        width: 5%;
        font-weight: bold;
    }
    .searchClass input{
        margin-right:60px;
    }
    #Search {
        float: right;
        margin-right: 4%;
        width: 40%;
    }
    #Reset {
        float: right;
        margin-right: 2%;
        width: 40%;
    }
    .col-md-1{
        text-align: right;
        display: inline-block;
    }
    .rowstyle{
        margin-top: 1%;
    }
</style>
<div class="row">
    <div id="breadcrumb" class="col-xs-12">
        <a href="#" class="show-sidebar">
            <i class="fa fa-bars"></i>
        </a>
        <ol class="breadcrumb pull-left">
            <li><a href="#">反馈管理</a></li>
            <li><a href="#">反馈管理</a></li>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <div class="box-name">
                    <i class="fa "></i>
                    <span>反馈管理</span>
                </div>
                <div class="box-icons">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="expand-link">
                        <i class="fa fa-expand"></i>
                    </a>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
                <div class="no-move"></div>
            </div>

            <div class="box-content table-responsive" style="padding-top: 15px;">
                <!--功能面板 S-->
                <div class="panel panel-default" style="border: 1px solid #CCC; height: auto;">
                    <div class="panel-heading" role="tab" id="headingOne">
                        <h4 class="panel-title" data-toggle="collapse" data-target="#collapseForAdd">
                            功能面板 <span class="fa fa-chevron-down" style="float: right"></span>
                        </h4>
                    </div>
                    <div id="collapseForAdd" class="panel-collapse collapse in" role="tabpanel"
                         aria-labelledby="headingOne">
                        <div class="panel-body">
                            <div class="container-fluid" style="margin-top: 20px;">
                                <!--操作-->
                                <div id="tb" class="col-xs-12">
                                    <div class="col-xs-13 btn-menu-top-minus">
                                        <button class="btn btn-primary btn-sm" id="look">
                                            <i class="fa fa-file-text"></i>查看
                                        </button>
                                        <button class="btn btn-danger btn-sm" id="del">
                                            <i class="fa fa-trash-o">&nbsp;删&nbsp;除</i>
                                        </button>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <!--功能面板 E-->
                <!--主信息面板 S-->
                <div class="panel panel-default" style="border: 1px solid #CCC;">
                    <div class="panel-heading" role="tab" id="headingTwo">
                        <h4 class="panel-title" data-toggle="collapse" data-target="#collapseForStudentTable">
                            轮播图列表<span class="fa fa-chevron-down" style="float: right"></span>
                        </h4>
                    </div>
                    <div id="collapseForStudentTable" class="panel-collapse collapse in" role="tabpanel"
                         aria-labelledby="headingTwo">
                        <!--搜索框-->
                        <div class="panel-body" style="overflow: hidden;">

                            <div class="searchClass">
                                <div class="row rowstyle">
                                    <div class='col-md-1' style="margin-top:7px;"><b>关键字</b></div>
                                    <div class="col-md-2"><input class="SearchForm form-control" type="text" name="keyword" style="width:140px;font-size: 13px;" placeholder="反馈人|微信|QQ"></div>
                                    <div class="col-md-1" style="margin-top:7px;"><b>反馈类型</b></div>
                                    <div class='col-md-2'>
                                        <select name="feedback_type" style="width:140px;font-size: 13px;" class="SearchForm form-control">
                                            <option value="">不限</option>
                                            {foreach name="data" item="vo"}
                                            <option value="{$vo['fb_id']}">{$vo['fb_name']}</option>
                                            {/foreach}
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <br/>
                        <button id="Search" class="btn btn-primary btn-sm" style="width:150px;">
                            <i class="fa fa-search"></i> 查询
                        </button><button id="Reset" class="btn btn-primary btn-sm" style="width:120px;">
                        <i class="fa fa-search"></i> 清空查询条件
                    </button>


                    </div>

                </div>
                <!--信息表 S-->
                <table id="datatable_studentinfo" data-size="15" style="width: 100%">
                </table>
                <!--信息表 E-->
            </div>
        </div>
        <!--主信息面板 E-->
    </div>
</div>

<!--<script type="text/javascript" src="static/plugins/AjaxUpload/Scirpt/ajaxupload.js"></script>-->
<script type="text/javascript" src="static/js/ajax/feedback.js"></script>
<script>
    $('#createtime').datepicker({
        language: 'zh-CN',
        format: "yyyy-mm-dd",
        todayBtn: "linked",
        autoclose: true,
        todayHighlight: true,
        clearBtn: true,
    });

    /***
     * 查看处理结果
     */
    function QyInfo(c) {
        var cid = c.name;
        //获得修改框内容
        var content = "";
        $.ajax({
            url: 'admin/Feedback/editResult',
            data: "id="+cid,
            type: 'POST',
            dataType: 'HTML', //返回的数据类型
            success: function(updatemodalhtml) {
                content = updatemodalhtml;
                //弹出修改框
                $.TeachDialog({
                    modalId: null,
                    animation: null,
                    title: '添加处理结果',
                    content: content,
                    showCloseButton: true,
                    showCloseButtonName: '关闭',
                    CloseButtonAddFunc: function() {
                    },
                    otherButtons: ['修改'],
                    otherButtonStyles: [],
                    bootstrapModalOption: {
                        backdrop: 'static'
                    },
                    largeSize: false,
                    smallSize: false,
                    dialogShow: function() {
                    },
                    dialogShown: function() {
                    },
                    dialogHide: function() {
                    },
                    dialogHidden: function() {
                    },
                    clickButton: function(sender, modal, index) {
                        $.ajax({
                            url: 'admin/Feedback/edit',
                            data: $("#addForm").serialize(),
                            type: 'POST',
                            dataType: 'JSON',
                            success: function(returnData) {
                                if (returnData.status == 0) {
                                    layer.msg(returnData.msg,{icon:5,time:2000});
                                } else {
                                    modal.modal('hide');
                                    layer.msg(returnData.msg,{icon:6,time:2000});
                                    $('#datatable_studentinfo').datagrid('reload');
                                }
                            },
                            error: function() {
                                // $.TeachDialog({
                                //     content: '添加失败',
                                // });
                                layer.msg("添加失败",{icon:5,time:2000});
                            },
                        });
                    },
                });
            },
            error: function() {
                // $.TeachDialog({
                //     content: '获取数据失败，无法进行添加',
                // });
                layer.msg("获取数据失败，无法进行添加",{icon:5,time:2000});
                return;
            }
        });
    }

    /***
     * 处理
     */
    function TyInfo(c) {
        var cid = c.name;
        //获得修改框内容
        var content = "";
        $.ajax({
            url: 'admin/Feedback/addResult',
            data: "id="+cid,
            type: 'POST',
            dataType: 'HTML', //返回的数据类型
            success: function(updatemodalhtml) {
                content = updatemodalhtml;
                //弹出修改框
                $.TeachDialog({
                    modalId: null,
                    animation: null,
                    title: '添加处理结果',
                    content: content,
                    showCloseButton: true,
                    showCloseButtonName: '关闭',
                    CloseButtonAddFunc: function() {
                    },
                    otherButtons: ['添加'],
                    otherButtonStyles: [],
                    bootstrapModalOption: {
                        backdrop: 'static'
                    },
                    largeSize: false,
                    smallSize: false,
                    dialogShow: function() {
                    },
                    dialogShown: function() {
                    },
                    dialogHide: function() {
                    },
                    dialogHidden: function() {
                    },
                    clickButton: function(sender, modal, index) {
                        $.ajax({
                            url: 'admin/Feedback/add',
                            data: $("#addForm").serialize(),
                            type: 'POST',
                            dataType: 'JSON',
                            success: function(returnData) {
                                if (returnData.status == 0) {
                                    layer.msg(returnData.msg,{icon:5,time:2000});
                                } else {
                                    modal.modal('hide');
                                    layer.msg(returnData.msg,{icon:6,time:2000});
                                    $('#datatable_studentinfo').datagrid('reload');
                                }
                            },
                            error: function() {
                                // $.TeachDialog({
                                //     content: '添加失败',
                                // });
                                layer.msg("添加失败",{icon:5,time:2000});
                            },
                        });
                    },
                });
            },
            error: function() {
                // $.TeachDialog({
                //     content: '获取数据失败，无法进行添加',
                // });
                layer.msg("获取数据失败，无法进行添加",{icon:5,time:2000});
                return;
            }
        });
    }
</script>